home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / fpc225_3.zip / F-PCHELP.ZIP / DEBUG.HLP < prev    next >
Text File  |  1988-04-03  |  5KB  |  121 lines

  1. \ DEBUG.HLP     A high level debugger      Enhancements by Tom Zimmer
  2.  
  3. \ The debugger is designed to let the user single step the
  4. \ execution of a high level definition.  To invoke the
  5. \ debugger, type DEBUG XXX where XXX is the name of the
  6. \ word you wish to trace.  When XXX executes, you will get
  7. \ a single step trace showing you the word within XXX that
  8. \ is about to execute, and the contents of the parameter
  9. \ stack. This debugger works by patching the NEXT routine,
  10. \ so it is highly machine and implementation dependent.
  11.  
  12. 'DEBUG  Code field for high level trace
  13. <IP     Lower limit of IP
  14. IP>     Upper limit of IP
  15. CNT     How many times thru debug next
  16.  
  17. UNBUG           ( -- )
  18.         Remove the debug point currently in place.
  19.  
  20. DSTK            ( --- a1 )
  21.         A 100 byte deep stack used for nesting Colon definitions.
  22.  
  23. SLOWLY          ( --- a1 )
  24.         Are we slowly stepping through the definition one step
  25.         at a time.
  26.  
  27. DCNT            ( --- a1 )
  28.         The depth of the nesting stack.
  29.  
  30. SFLG            ( --- a1 )
  31.         Slow flag ??
  32.  
  33. 'DOCOL          ( --- a1 )
  34.         Address of DoColon.
  35.  
  36. 'UDEFER         ( --- a1 )
  37.         Address of DoUser.
  38.  
  39. 'DEFER          ( --- a1 )
  40.         Address of DoDefer.
  41.  
  42. D.ID            ( -- )
  43.         The debugger ID.
  44.  
  45. (DBG)           ( CFA -- )
  46.         Sets up a Colon definition for debugging. Sets various
  47.         parameters.
  48.  
  49. DSTK0           ( --- )
  50.         Reset the Colon definition nest stack.
  51.  
  52. >DS             ( n1 --- )
  53.         Push value n1 onto the DST stack.
  54.  
  55. DS>             ( --- n1 )
  56.         Pop a value off of the DST stack.
  57.  
  58. >DSTK           ( A1 --- )
  59.         Conditionally nest into definition a1, if the definition
  60.         is a Colon def, a User def, or a Defered word.
  61.  
  62. ?DST>           ( A1- F1 )
  63.         Conditionally un-nest the current definition, and pop up to
  64.         the previous level.
  65.  
  66. GET-COMMAND     ( --- c1 )
  67.         Get a key from the keyboard, and process it. Can allow
  68.         entry of Forth commands, it the F key is pressed.
  69.  
  70. TRACE           ( Ip --- )
  71.         Perform one step through the debugger, get a comment from
  72.         the user, and process it. May allow entry of Forth commands,
  73.         Nesting, Un-nesting, Quitting, ect. See DEBUG for further
  74.         information.
  75.  
  76. ADEBUG          ( A1 --- )
  77.         Set the CFA=a1 as the current word to be debugged.
  78.  
  79. DEBUG           ( | name --- )
  80.         Look up the word following DEBUG, and make it the next word
  81.         to be debugged.
  82.  
  83.          The commands are available while debugging, as follows;
  84.  
  85.        C-cont          Continuous, scrolls through words as they
  86.                        are executed, stop by pressing <return>.
  87.        F-forth         Allow entry of Forth commands, until a <return>
  88.                        is pressed on an empty command line.
  89.                        P.S. don't make any typing errors or you will
  90.                        fall out of the debugger.
  91.        Q-quit          Quit the debugger, and unpatch the debug word.
  92.                        Returns to Forth.
  93.        N-nest          Nest into the current definition the debugger
  94.                        is sitting on, if it is a ":" definition, else
  95.                        issue an error message but don't abort.
  96.        U-unnest        Unnest from the current word being debugged, the
  97.                        debugger will re-enter when the word finishes
  98.                        executing, and pops up one level to the word that
  99.                        called it. You cannot Unnest without Nesting.
  100.        Z-zip           Zip through definitions, like C-cont, but only
  101.                        zips through code definitions, still pauses on
  102.                        ":" definitions.
  103.        X-source OFF    Turn OFF the display of source text at the top
  104.                        of the screen. The words SRCOFF and SRCON will
  105.                        also do this.
  106.  
  107. #DEBUG          ( n1 | name --- )
  108.         Set the name as the current word to be debugged, with value
  109.         n1 as the number of times next should be executed before
  110.         debugging starts. Yes I know this is obscure, but it can
  111.         be useful at times.
  112.  
  113. DEBUG>          ( --- )
  114.         Set the debugger to start working immediately on the following
  115.         word when it is encountered in the current colon definition.
  116.  
  117. DBG             ( | name --- )
  118.         Start debugging the word following DBG immediately.
  119.         See also DEBUG.
  120.  
  121.